package cloud.smalla.utils;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * description
 *
 * @author 曾
 * Time：2023-06-27 14:09
 */
public class WebUtil {
    /**
     * 将字符串渲染到客户端上
     */
    public static String renderString(HttpServletResponse response, String string){
        try
        {
            response.setStatus(200);
            response.setContentType("application/json");
            response.setCharacterEncoding("utf-8");
            response.getWriter().print(string);
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        return null;

    }
}
